import request from '@/utils/request.js'

// 注册登录
export function register(params) {
	return request({
		url: '/devicewx-ylproject/api/v1/ylproject/ylUser/register',
		method: 'GET',
		params
	})
}

// 注册登录
export function logoff(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylUser/logoff',
		method: 'GET',
		params
	})
}

// 注册登录
export function demoRegister(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylUser/demoRegister',
		method: 'GET',
		params
	})
}

// 获取token
export function getToken(params) {
	return request({
		url: '/devicewx-auth/oauth/token',
		method: 'GET',
		params
	})
}


// 添加用户信息详情
export function addDetails(data) {
	return request({
		url: '/devicewx-ylproject/api/v1/ylproject/ylUserDetails/addDetails',
		method: 'POST',
		data
	})
}

// 编辑用户头像
export function uploadAvatar(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/uploadAvatar',
		method: 'POST',
		data
	})
}

// 修改用户详情
export function updateDetails(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/reSaveOpen',
		method: 'POST',
		data
	})
}

// 添加生活方式详情
export function addLifestyle(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/addLifestyle',
		method: 'POST',
		data
	})
}

// 用户id获取生活方式详情
export function getLifeByUserId(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/lifestyleByUser',
		method: 'GET',
		params
	})
}

// 查看用户是否绑定仪器
export function getDeviceByUser(params) {
	return request({
		url: '/devicewx-level/api/v1/level/YlLevelUserDevice/getByUserId',
		method: 'GET',
		params
	})
}

// 添加仪器并绑定用户
export function addDevice(data) {
	return request({
		url: '/devicewx-level/api/v1/level/YlLevelUserDevice/add',
		method: 'POST',
		data
	})
}

// 查询单个仪器信息
export function findDeviceMsgByOne(params) {
	return request({
		url: '/devicewx-level/api/v1/level/YlLevelUserDevice/findDeviceMsgByOne',
		method: 'GET',
		params
	})
}

// 解绑仪器
export function unbindDevice(data) {
	return request({
		url: '/devicewx-level/api/v1/level/YlLevelUserDevice/deleteBing',
		method: 'POST',
		data
	})
}

// 添加测量数据（开始测量）
export function addRecord(data) {
	return request({
		url: '/devicewx-ylproject/api/v1/ylproject/YlMetabolizeRecord/add',
		method: 'POST',
		data
	})
}

// 修改测量数据（开始测量）
export function uploadRecord(data) {
	return request({
		url: '/devicewx-ylproject/api/v1/ylproject/YlMetabolizeRecord/addRecord',
		method: 'POST',
		data
	})
}

// 修改测量人名称
export function updateRecordName(data) {
	return request({
		url: '/devicewx-ylproject/api/v1/ylproject/YlMetabolizeRecord/updateName',
		method: 'POST',
		data
	})
}

// 查看用户测量数量
export function getRecordByUser(data) {
	return request({
		url: '/devicewx-ylproject/api/v1/ylproject/YlMetabolizeRecord/getRecordByUser',
		method: 'POST',
		data
	})
}

/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- >
*/

// 保存用户信息
export function saveUserMsgByUserId(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/reSave',
		method: 'POST',
		data
	})
}

// 查询用户信息
export function getUserMsgByUserId(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findUserMsgByUserId',
		method: 'GET',
		params
	})
}

// 获取周回顾
export function getWeekReview(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/getWeekReview',
		method: 'POST',
		data
	})
}

// 获取测量等级记录
export function getMeasureGradeRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/getMeasureGradeRecord',
		method: 'POST',
		data
	})
}

// 获取体重变化曲线
export function getWeightRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/getWeightRecord',
		method: 'POST',
		data
	})
}

// 添加体重记录
export function addWeightLog(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/addWeightLog',
		method: 'POST',
		data
	})
}

// 删除体重记录
export function delWeightLog(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/delWeightLog',
		method: 'POST',
		data
	})
}


// 获取期望流量值
export function getExpectationVal(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findExpectationVal',
		method: 'GET',
		params
	})
}

// 新增吸气浓度数据
export function addInhaleRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/add',
		method: 'POST',
		data
	})
}

// 添加关联注册信息
export function addCorrelationMsg(data) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/addCorrelationMsg',
		method: 'POST',
		data
	})
}

// 查询测量次数
export function findMeasureNumber(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findMeasureNumber',
		method: 'GET',
		params
	})
}

// 吸呼气测量判断身体信息是否生效
export function findBodyIsVaild(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findBodyIsVaild',
		method: 'GET',
		params
	})
}

// 判断身体信息是否生效
export function getBodyMsgIsVaild(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/getBodyMsgIsVaild',
		method: 'GET',
		params
	})
}

// 计算呼气量3个值
export function findExpirationVal(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findExpirationVal',
		method: 'GET',
		params
	})
}

// 新增呼气浓度数据
export function addExpirationData(data) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/addExpirationData',
		method: 'POST',
		data
	})
}

// 获取测量结果等级
export function getRer(data) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/calculateRer',
		method: 'POST',
		data
	})
}

// 根据用户id查询详情
export function detailsByUser(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/detailsByUser',
		method: 'GET',
		params
	})
}

// 根据用户id查询详情
export function getDetailsByUser(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/getDetailsByUser',
		method: 'GET',
		params
	})
}


// 编辑（重新生成数据,并将有效值开启）
export function reSaveOpen(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/reSaveOpen',
		method: 'POST',
		data
	})
}


// 本周概况
export function getThisWeekSituation(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/getThisWeekSituation',
		method: 'GET',
		params
	})
}

// 获取测量标签
export function getTag(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/getTag',
		method: 'GET',
		params
	})
}


//  3.0
// 呼气测量添加关联注册信息
export function addExhaleCorrelationMsg(data) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/addExhaleCorrelationMsg',
		method: 'POST',
		data
	})
}

// 进系统查询身体信息
export function findBodyMegByUserId(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findBodyMegByUserId',
		method: 'GET',
		params
	})
}

// 吸气和呼气量时候期望值中3个值
export function findInhaleThreeVal(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findInhaleThreeVal',
		method: 'GET',
		params
	})
}

// 获取用户最大吸气量及呼气量的转换L值
export function getMaxInhaleExhale(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/getMaxInhaleExhale',
		method: 'GET',
		params
	})
}

// 用户放弃关联测量数据,上传关联信息后放弃
export function abandonMeasure(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/abandonMeasure',
		method: 'GET',
		params
	})
}

// 查询测量记录
export function findDemoMeasureRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findMeasureRecord',
		method: 'GET',
		params
	})
}

// 查询已经生效的测量记录
export function findEffectiveData(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findEffectiveData',
		method: 'GET',
		params
	})
}

// 查询测量统计数据
export function findMeasureStatistics(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findMeasureStatistics',
		method: 'GET',
		params
	})
}

// 是否跳转呼气测量,1:跳转,0:不跳转
export function findExhaleData(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findExhaleData',
		method: 'GET',
		params
	})
}

// 需要跳转呼气测量
export function skipExhaleMeasure(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/skipExhaleMeasure',
		method: 'GET',
		params
	})
}

// 是否注册成功,1:成功,0:失败
export function findRegisterSucceed(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findRegisterSucceed',
		method: 'GET',
		params
	})
}

// 放弃测量,身体信息生效后
export function abandonBodyMeasure(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/abandonBodyMeasure',
		method: 'GET',
		params
	})
}

// 系统放弃处理
export function systemAbandonDispose(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/systemAbandonDispose',
		method: 'GET',
		params
	})
}

// 判断身体是不是有效并且异常,1:是,0:不是
export function findBodyValidException(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findBodyValidException',
		method: 'GET',
		params
	})
}

// 判断身体是不是有效并且异常,1:是,0:不是
export function findFirstRer(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findFirstRer',
		method: 'GET',
		params
	})
}

// 查询已经生效的测量次数
export function findEffectiveTimes(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findEffectiveTimes',
		method: 'GET',
		params
	})
}

// 查询已经生效的测量次数
export function globalReturnPage(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/globalReturnPage',
		method: 'GET',
		params
	})
}

// 获取吸气量时间,1:8秒,0:6秒
export function getExhaleTime(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/getExhaleTime',
		method: 'GET',
		params
	})
}



// 正式版
// 查询测量记录柱状图 弃用
export function findMeasureRecordByPage(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findMeasureRecordByPage',
		method: 'GET',
		params
	})
}

// 查询饮食对比
export function findMealDietaryContrast(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findMealDietaryContrast',
		method: 'POST',
		data
	})
}

// 查询当天的饮食摄入量统计
export function findDayDietaryIntake(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findDayDietaryIntake',
		method: 'POST',
		data
	})
}

// 查询每餐的饮食摄入量
export function findMealDietaryIntake(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findMealDietaryIntake',
		method: 'GET',
		params
	})
}

// 查询早中晚零食饮食列表
export function findMealDietaryPage(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findMealDietaryPage',
		method: 'POST',
		data
	})
}

// 查询饮食记录详情
export function findDietaryDetails(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findDietaryDetails',
		method: 'GET',
		params
	})
}

// 添加一条饮食记录
export function addDietaryOneRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/addDietaryOneRecord',
		method: 'POST',
		data
	})
}

// 删除饮食记录详情
export function delDietaryRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/delDietaryRecord',
		method: 'GET',
		params
	})
}

// 修改饮食记录详情
export function updateDietaryRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/updateDietaryRecord',
		method: 'POST',
		data
	})
}

// 查询每一餐的饮食列表
export function findOneMealDietary(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findOneMealDietary',
		method: 'GET',
		params
	})
}
// 根据用餐类型查询每一餐的饮食列表
export function findOneMealDietaryByType(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findOneMealDietaryByType',
		method: 'POST',
		data
	})
}

// 查询运动趋势比较
export function findSportComparison(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSportComparison',
		method: 'POST',
		data
	})
}

// 查询睡眠变化趋势比较
export function findSleepCompare(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepCompare',
		method: 'POST',
		data
	})
}

// 查询当天的用餐时间,饮食对比显示使用
export function findMealDietaryTime(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findMealDietaryTime',
		method: 'POST',
		data
	})
}

// 测量记录增加备注
export function addRemark(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/addRemark',
		method: 'POST',
		data
	})
}

// 代谢等级记录,日表折线图
export function findDietaryLineChart(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findDietaryLineChart',
		method: 'POST',
		data
	})
}

// 代谢等级测量,日表中测量竖线
export function findDietaryLineVertical(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findDietaryLineVertical',
		method: 'POST',
		data
	})
}

// 查询周柱状图,月柱状图
export function findMeasureRecordByTag(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findMeasureRecordByTag',
		method: 'POST',
		data
	})
}

// 查询测量记录,等级详情测量列表
export function findMeasureRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findMeasureRecord',
		method: 'GET',
		params
	})
}

// 查询每天测量次数
export function findMeasureRecordByDay(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findMeasureRecordByDay',
		method: 'POST',
		data
	})
}

// 查询运动类型
export function findSportType(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSportType',
		method: 'GET',
		params
	})
}

// 添加运动记录
export function addSportRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/addSportRecord',
		method: 'POST',
		data
	})
}

// 删除运动记录
export function delSportRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/delSportRecord',
		method: 'GET',
		params
	})
}

// 修改运动记录
export function updateSportRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/updateSportRecord',
		method: 'POST',
		data
	})
}

// 查询当天的运动记录
export function findSportDayRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findSportDayRecord',
		method: 'GET',
		params
	})
}

// 查询每天的运动记录
export function findSportDataByDay(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSportDataByDay',
		method: 'POST',
		data
	})
}

// 按天统计运动记录
export function findSportDataDayPage(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSportDataDayPage',
		method: 'POST',
		data
	})
}

// 查询平均每天运动时间,柱状图
export function findSportAvgTime(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSportAvgTime',
		method: 'POST',
		data
	})
}

// 查询运动柱状图
export function findSportHistogram(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSportHistogram',
		method: 'POST',
		data
	})
}

// 查询餐前测量记录,餐后测量使用
export function findMealMeasureRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findMealMeasureRecord',
		method: 'POST',
		data
	})
}


// 查询睡前测量记录
export function findFrontSleepRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findFrontSleepRecord',
		method: 'GET',
		params
	})
}

// 添加睡眠记录
export function addSleepRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/addSleepRecord',
		method: 'POST',
		data
	})
}
// 根据日期查询睡眠记录
export function findSleepDayRecordByDay(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepDayRecordByDay',
		method: 'POST',
		data
	})
}

// 查询当天的睡眠记录
export function findSleepDayRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepDayRecord',
		method: 'GET',
		params
	})
}


// 修改睡眠记录
export function updateSleepRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/updateSleepRecord',
		method: 'POST',
		data
	})
}

// 删除睡眠记录
export function delSleepRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/delSleepRecord',
		method: 'GET',
		params
	})
}

// 查询睡眠平均时间
export function findSleepAvg(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepAvg',
		method: 'POST',
		data
	})
}

// 查询睡眠详情柱状图
export function findSleepPicture(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepPicture',
		method: 'POST',
		data
	})
}

// 查询睡眠数据列表
export function findSleepList(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepList',
		method: 'POST',
		data
	})
}

// 添加饮食记录
export function addDietaryRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/addDietaryRecord',
		method: 'POST',
		data
	})
}

// 测量Rer弹窗,2分钟内只能测量一次,1:弹窗,0:不弹窗
export function findMeasureRerPopup(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findMeasureRerPopup',
		method: 'GET',
		params
	})
}

// 代谢弹性分数 -----------------------
// 查询日目标完成情况
export function findMetabolicFlexScoreDayTarget(params) {
	return request({
		url: '/devicewx-level/api/v1/level/metabolicFlexScore/findMetabolicFlexScoreDayTarget',
		method: 'GET',
		params
	})
}

// 查询代谢弹性分数折现图
export function findMetabolicFlexScoreLineChart(data) {
	return request({
		url: '/devicewx-level/api/v1/level/metabolicFlexScore/findMetabolicFlexScoreLineChart',
		method: 'POST',
		data
	})
}

// 查询弹性分数最大值最小值
export function findMaxMinMetabolicFlexScore(params) {
	return request({
		url: '/devicewx-level/api/v1/level/metabolicFlexScore/findMaxMinMetabolicFlexScore',
		method: 'GET',
		params
	})
}

// 查询代谢弹性分数
export function findMetabolicFlexScore(data) {
	return request({
		url: '/devicewx-level/api/v1/level/metabolicFlexScore/findMetabolicFlexScore',
		method: 'POST',
		data
	})
}

//  OTA板块
// 查询固件列表
export function findFirmwareList(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelFirmware/findFirmwareList',
		method: 'POST',
		data
	})
}

// 查询固件是否需要升级,0:不升级,1:升级
export function findUpgradeMsg(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelFirmware/findUpgradeMsg',
		method: 'POST',
		data
	})
}


// 流程测量
// 修改最大呼气量(肺活量)
export function updateExhaleVal(data) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/updateExhaleVal',
		method: 'POST',
		data
	})
}

// 查询肺活量测量记录
export function findExhaleValRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/inhaleRecord/findExhaleValRecord',
		method: 'GET',
		params
	})
}
// 获取菜系信息
export function getCuisineMsg(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/getCuisineMsg',
		method: 'GET',
		params
	})
}
// 保存用户信息
export function registerUser(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/reSave',
		method: 'POST',
		data
	})
}
// 反馈 start
// 添加用户反馈
export function addUserFeedback(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserFeedback/addUserFeedback',
		method: 'POST',
		data
	})
}
// 查询反馈模块
export function findFeedbackModule(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserFeedback/findFeedbackModule',
		method: 'GET',
		params
	})
}
// 查询反馈类型
export function findFeedbackType(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserFeedback/findFeedbackType',
		method: 'GET',
		params
	})
}
// 用户查看回复
export function findUserFeedbackReply(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserFeedback/findUserFeedbackReply',
		method: 'GET',
		params
	})
}
// 用户查询反馈
export function findUserFeedbackDetail(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserFeedback/findUserFeedbackDetail',
		method: 'POST',
		data
	})
}
// 消息首页查询是否有小红点,0:没有,1:有小红点
export function findUserRedDot(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserFeedback/findUserRedDot',
		method: 'GET',
		params
	})
}
// 反馈 end

// 观察页面start
// 查询饮食记录对比
export function findDietaryComparison(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findDietaryComparison',
		method: 'POST',
		data
	})
}
// 查询用餐时间
export function findDietaryTime(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findDietaryTime',
		method: 'POST',
		data
	})
}
// 查询运动测量记录比较
export function observeFindSportComparison(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findSportComparison',
		method: 'POST',
		data
	})
}
// 获取运动记录
export function observeFindSportRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findSportRecord',
		method: 'POST',
		data
	})
}
// 查询起床时间,睡眠时间
export function observeFindSleepTime(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findSleepTime',
		method: 'POST',
		data
	})
}
// 查询睡眠测量记录比较
export function observeFindSleepComparison(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findSleepComparison',
		method: 'POST',
		data
	})
}
// 查询今日代谢水平
export function observeFindTodayMetabolism(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findTodayMetabolism',
		method: 'POST',
		data
	})
}
// 查询代谢弹性分数记录
export function observeFindMetabolismScoreRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findMetabolismScoreRecord',
		method: 'POST',
		data
	})
}
// 观察页面end
// 食物start
export function getFoodList(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/getFoodList',
		method: 'GET',
		params
	})
}
// 食物end
// 查询运动前后测量记录
export function findSportMeasureRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSportMeasureRecord',
		method: 'POST',
		data
	})
}
// 查询运动详情
export function findSportDetails(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSportDetails',
		method: 'GET',
		params
	})
}
// 计算消耗热量
export function getConsumeHeat(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/getConsumeHeat',
		method: 'POST',
		data
	})
}
// 获取食物能量值
export function getFoodEnergy(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/getFoodEnergy',
		method: 'GET',
		params
	})
}
// 按天查询碳水比例
export function findCh0RateByDay(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findCh0RateByDay',
		method: 'POST',
		data
	})
}
// 查询碳水燃烧比例
export function findCh0RateRecord(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findCh0RateRecord',
		method: 'GET',
		params
	})
}

// 膳食方案查询食物列表
export function findFoodList(data) {
	return request({
		url: '/devicewx-level/api/v1/level/dietaryRecommend/findFoodList',
		method: 'POST',
		data
	})
}
// 查询推荐统计
export function findRecommendStatistics(data) {
	return request({
		url: '/devicewx-level/api/v1/level/dietaryRecommend/findRecommendStatistics',
		method: 'POST',
		data
	})
}
// 查询营养信息详情
export function findNutritionDetail(data) {
	return request({
		url: '/devicewx-level/api/v1/level/dietaryRecommend/findNutritionDetail',
		method: 'POST',
		data
	})
}
// 下周推荐预览
export function findNextWeekDietaryRecommend(data) {
	return request({
		url: '/devicewx-level/api/v1/level/dietaryRecommend/findNextWeekDietaryRecommend',
		method: 'POST',
		data
	})
}
// 今日推荐膳食方案
export function findDietRecommendScheme(data) {
	return request({
		url: '/devicewx-level/api/v1/level/dietaryRecommend/findDietRecommendScheme',
		method: 'POST',
		data
	})
}
// 测量结果文章返回
export function findMeasureArticle(data) {
	return request({
		url: '/devicewx-level/api/v1/level/exploreArticle/findMeasureArticle',
		method: 'POST',
		data
	})
}
// 探索文章列表查询
export function findArticleByPage(data) {
	return request({
		url: '/devicewx-level/api/v1/level/exploreArticle/findArticleByPage',
		method: 'POST',
		data
	})
}
// 查询文章详情
export function findArticleDetail(data) {
	return request({
		url: '/devicewx-level/api/v1/level/exploreArticle/findArticleDetail',
		method: 'POST',
		data
	})
}
// 查询文章菜单列表
export function findArticleMenu(params) {
	return request({
		url: '/devicewx-level/api/v1/level/exploreArticle/findArticleMenu',
		method: 'get',
		params
	})
}
// 查询通知消息列表
export function findMessagePage(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserFeedback/findMessagePage',
		method: 'POST',
		data
	})
}
// 查询通知消息详情
export function findMessageDetail(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserFeedback/findMessageDetail',
		method: 'get',
		params
	})
}
// 查询通知未读数量
export function findMessageRedDot(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserFeedback/findMessageRedDot',
		method: 'get',
		params
	})
}
// 查询轮播文章
export function findSlideshowArticle(data) {
	return request({
		url: '/devicewx-level/api/v1/level/exploreArticle/findSlideshowArticle',
		method: 'post',
		data
	})
}
// 修改引导页为已读
export function updateUserGuide(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/updateUserGuide',
		method: 'get',
		params
	})
}
// 打卡活动 start
// 获取分析报告
export function getAnalyseReport(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylPunchCard/getAnalyseReport',
		method: 'post',
		data
	})
}
// 查询是否开启了打卡活动,1:开启,0:未开启
export function getIsOpenActivity(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylPunchCard/getIsOpenActivity',
		method: 'post',
		data
	})
}
// 根据步数计算消耗热量
export function getKcalByStep(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylPunchCard/getKcalByStep',
		method: 'get',
		params
	})
}
// 获取打卡记录详情
export function getPunchCardDetail(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylPunchCard/getPunchCardDetail',
		method: 'post',
		data
	})
}
// 获取打卡活动提示语
export function getPunchCardPrompt(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylPunchCard/getPunchCardPrompt',
		method: 'post',
		data
	})
}
// 查询当前用户是否显示28打卡活动,1:显示,0:不显示
export function getShowActivity(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylPunchCard/getShowActivity',
		method: 'post',
		data
	})
}
// 开启28天打卡活动
export function openPunchCardActivity(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylPunchCard/openPunchCardActivity',
		method: 'post',
		data
	})
}
// 用户补卡
export function reissueCard(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylPunchCard/reissueCard',
		method: 'post',
		data
	})
}
// 获取微信步数
export function getDecodeData(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylUser/getDecodeData',
		method: 'get',
		params
	})
}
// 打卡活动 end
// 获取微信手机号
export function getWxPhone(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/getWxPhone',
		method: 'get',
		params
	})
}
// 绑定手机号
export function userBindingPhone(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/userBindingPhone',
		method: 'post',
		data
	})
}
// 查询用户绑定手机号
export function findUserPhone(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/findUserPhone',
		method: 'get',
		params
	})
}
// 查询用户绑定手机号
export function unbindUserPhone(params) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/unbindUserPhone',
		method: 'get',
		params
	})
}
// 发送验证码
export function sendPhoneCode(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylLevelUserDetails/sendPhoneCode',
		method: 'post',
		data
	})
}
// 支付
export function wxPay(params) {
	return request({
		url: '/devicewx-pay/api/v1/pay/levelPay/wxPay',
		method: 'get',
		params
	})
}
// 查询隐藏视频,0:隐藏,1:显示
export function findHideVideo(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findHideVideo',
		method: 'get',
		params
	})
}
// 3.0修改的接口start

// 查询营养推荐,3.0
export function findDietaryRecommend(data) {
	return request({
		url: '/devicewx-level/api/v1/level/dietaryRecommend/findDietaryRecommend',
		method: 'post',
		data
	})
}
export function findNewestRerLevel(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findNewestRerLevel',
		method: 'get',
		params
	})
}
export function findSportExpend(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSportExpend',
		method: 'post',
		data
	})
}
export function findPiePic(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findPiePic',
		method: 'post',
		data
	})
}
// 查询测量记录,3.0
export function findCh0RateRecord30(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findCh0RateRecord',
		method: 'post',
		data
	})
}
// 行为记录查询运动柱状图,3.0
export function findSportHistogramDay(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findSportHistogramDay',
		method: 'post',
		data
	})
}
// 睡眠时长折线图,3.0
export function findSleepDurationDay(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepDurationDay',
		method: 'post',
		data
	})
}
// 根据日期查询睡眠记录,3.0
export function findSleepDayRecordByDay30(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepDayRecordByDay',
		method: 'post',
		data
	})
}
// 查询睡眠平均时间,3.0
export function findSleepAvg30(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepAvg',
		method: 'post',
		data
	})
}
// 查询睡眠详情,3.0
export function findSleepDetails(params) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findSleepDetails',
		method: 'get',
		params
	})
}
// 修改睡眠记录,3.0
export function updateSleepRecord30(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/updateSleepRecord',
		method: 'post',
		data
	})
}
// 获取当月内所有的运动记录,3.0
export function findAllSportRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findAllSportRecord',
		method: 'post',
		data
	})
}
// 获取用餐id
export function getMealId(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/getMealId',
		method: 'post',
		data
	})
}
// 查询代谢弹性分数折现图,3.0
export function findMetabolismRecord(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findMetabolismRecord',
		method: 'post',
		data
	})
}
// 查询代谢水平详情天数,3.0
export function findMetabolismDetail(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findMetabolismDetail',
		method: 'post',
		data
	})
}
// 查询等级解释,3.0
export function findMetabolismGradeExplain(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findMetabolismGradeExplain',
		method: 'post',
		data
	})
}
// 查询等级解释,3.0
export function findMealDietaryPage30(data) {
	return request({
		url: '/devicewx-level/api/v1/level/homePage/findMealDietaryPage',
		method: 'post',
		data
	})
}
// 查询等级解释,3.0
export function findMeasureResult(data) {
	return request({
		url: '/devicewx-level/api/v1/level/ylObserveComparison/findMeasureResult',
		method: 'post',
		data
	})
}
// 3.0修改的接口end